﻿<ResourceDictionary xmlns:CharMap="clr-namespace:CharMap"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<!--<Style TargetType="CharMap:FlexScrollBar">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="CharMap:FlexScrollBar">
					<Grid x:Name="PART_TemplateRoot" SnapsToDevicePixels="True">
						<Grid.RowDefinitions>
							<RowDefinition
									MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
							<RowDefinition Height="1E-05*" />
							<RowDefinition
									MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}" />
						</Grid.RowDefinitions>
						<Border BorderBrush="{TemplateBinding BorderBrush}"
								BorderThickness="{TemplateBinding BorderThickness}"
								Background="{TemplateBinding Background}" Grid.Row="1" />
						<RepeatButton x:Name="PART_LineUpButton" Command="ScrollBar.LineUpCommand"
								IsEnabled="{TemplateBinding IsMouseOver}">
							<RepeatButton.Style>
								<Style TargetType="{x:Type RepeatButton}">
									<Setter Property="FocusVisualStyle">
										<Setter.Value>
											<Style>
												<Setter Property="Control.Template">
													<Setter.Value>
														<ControlTemplate>
															<Rectangle Margin="2" SnapsToDevicePixels="True"
																	Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
																	StrokeThickness="1" StrokeDashArray="1 2" />
														</ControlTemplate>
													</Setter.Value>
												</Setter>
											</Style>
										</Setter.Value>
									</Setter>
									<Setter Property="BorderThickness" Value="1" />
									<Setter Property="HorizontalContentAlignment" Value="Center" />
									<Setter Property="VerticalContentAlignment" Value="Center" />
									<Setter Property="Padding" Value="1" />
									<Setter Property="Focusable" Value="False" />
									<Setter Property="IsTabStop" Value="False" />
									<Setter Property="Template">
										<Setter.Value>
											<ControlTemplate TargetType="{x:Type RepeatButton}">
												<Border x:Name="border" BorderBrush="#FFF0F0F0" BorderThickness="1"
														Background="#FFF0F0F0" SnapsToDevicePixels="True">
													<ContentPresenter x:Name="contentPresenter"
															ContentTemplate="{TemplateBinding ContentTemplate}"
															Content="{TemplateBinding Content}"
															ContentStringFormat="{TemplateBinding ContentStringFormat}"
															Focusable="False"
															HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
															Margin="{TemplateBinding Padding}"
															SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
															VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
												</Border>
												<ControlTemplate.Triggers>
													<Trigger Property="IsMouseOver" Value="True">
														<Setter Property="Background" TargetName="border"
																Value="#FFDADADA" />
														<Setter Property="BorderBrush" TargetName="border"
																Value="#FFDADADA" />
													</Trigger>
													<Trigger Property="IsPressed" Value="True">
														<Setter Property="Background" TargetName="border"
																Value="#FF606060" />
														<Setter Property="BorderBrush" TargetName="border"
																Value="#FF606060" />
													</Trigger>
													<Trigger Property="IsEnabled" Value="False">
														<Setter Property="Opacity" TargetName="contentPresenter"
																Value="0.56" />
														<Setter Property="Background" TargetName="border"
																Value="#FFF0F0F0" />
														<Setter Property="BorderBrush" TargetName="border"
																Value="#FFF0F0F0" />
													</Trigger>
												</ControlTemplate.Triggers>
											</ControlTemplate>
										</Setter.Value>
									</Setter>
								</Style>
							</RepeatButton.Style>
							<Path x:Name="ArrowTop"
									Data="M0,4C0,4 0,6 0,6 0,6 3.5,2.5 3.5,2.5 3.5,2.5 7,6 7,6 7,6 7,4 7,4 7,4 3.5,0.5 3.5,0.5 3.5,0.5 0,4 0,4z"
									Fill="#FF606060" Margin="3,4,3,3" Stretch="Uniform" />
						</RepeatButton>
						<Track x:Name="PART_Track" IsDirectionReversed="True" IsEnabled="{TemplateBinding IsMouseOver}"
								Grid.Row="1" Maximum="1" Minimum="0" Orientation="Vertical">
							<Track.DecreaseRepeatButton>
								<RepeatButton Command="ScrollBar.PageUpCommand">
									<RepeatButton.Style>
										<Style TargetType="{x:Type RepeatButton}">
											<Setter Property="OverridesDefaultStyle" Value="True" />
											<Setter Property="Background" Value="Transparent" />
											<Setter Property="Focusable" Value="False" />
											<Setter Property="IsTabStop" Value="False" />
											<Setter Property="Template">
												<Setter.Value>
													<ControlTemplate TargetType="{x:Type RepeatButton}">
														<Rectangle Fill="{TemplateBinding Background}"
																Height="{TemplateBinding Height}"
																Width="{TemplateBinding Width}" />
													</ControlTemplate>
												</Setter.Value>
											</Setter>
										</Style>
									</RepeatButton.Style>
								</RepeatButton>
							</Track.DecreaseRepeatButton>
							<Track.IncreaseRepeatButton>
								<RepeatButton Command="ScrollBar.PageDownCommand">
									<RepeatButton.Style>
										<Style TargetType="{x:Type RepeatButton}">
											<Setter Property="OverridesDefaultStyle" Value="True" />
											<Setter Property="Background" Value="Transparent" />
											<Setter Property="Focusable" Value="False" />
											<Setter Property="IsTabStop" Value="False" />
											<Setter Property="Template">
												<Setter.Value>
													<ControlTemplate TargetType="{x:Type RepeatButton}">
														<Rectangle Fill="{TemplateBinding Background}"
																Height="{TemplateBinding Height}"
																Width="{TemplateBinding Width}" />
													</ControlTemplate>
												</Setter.Value>
											</Setter>
										</Style>
									</RepeatButton.Style>
								</RepeatButton>
							</Track.IncreaseRepeatButton>
							<Track.Thumb>
								<Thumb x:Name="PART_Thumb">
									<Thumb.Style>
										<Style TargetType="{x:Type Thumb}">
											<Setter Property="OverridesDefaultStyle" Value="True" />
											<Setter Property="IsTabStop" Value="False" />
											<Setter Property="Template">
												<Setter.Value>
													<ControlTemplate TargetType="{x:Type Thumb}">
														<Rectangle x:Name="rectangle" Fill="#FFCDCDCD"
																Height="{TemplateBinding Height}"
																SnapsToDevicePixels="True"
																Width="{TemplateBinding Width}" />
														<ControlTemplate.Triggers>
															<Trigger Property="IsMouseOver" Value="True">
																<Setter Property="Fill" TargetName="rectangle"
																		Value="#FFA6A6A6" />
															</Trigger>
															<Trigger Property="IsDragging" Value="True">
																<Setter Property="Fill" TargetName="rectangle"
																		Value="#FF606060" />
															</Trigger>
														</ControlTemplate.Triggers>
													</ControlTemplate>
												</Setter.Value>
											</Setter>
										</Style>
									</Thumb.Style>
								</Thumb>
							</Track.Thumb>
						</Track>
						<RepeatButton x:Name="PART_LineDownButton" Command="ScrollBar.LineDownCommand"
								IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="2">
							<RepeatButton.Style>
								<Style TargetType="{x:Type RepeatButton}">
									<Setter Property="FocusVisualStyle">
										<Setter.Value>
											<Style>
												<Setter Property="Control.Template">
													<Setter.Value>
														<ControlTemplate>
															<Rectangle Margin="2" SnapsToDevicePixels="True"
																	Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
																	StrokeThickness="1" StrokeDashArray="1 2" />
														</ControlTemplate>
													</Setter.Value>
												</Setter>
											</Style>
										</Setter.Value>
									</Setter>
									<Setter Property="BorderThickness" Value="1" />
									<Setter Property="HorizontalContentAlignment" Value="Center" />
									<Setter Property="VerticalContentAlignment" Value="Center" />
									<Setter Property="Padding" Value="1" />
									<Setter Property="Focusable" Value="False" />
									<Setter Property="IsTabStop" Value="False" />
									<Setter Property="Template">
										<Setter.Value>
											<ControlTemplate TargetType="{x:Type RepeatButton}">
												<Border x:Name="border" BorderBrush="#FFF0F0F0" BorderThickness="1"
														Background="#FFF0F0F0" SnapsToDevicePixels="True">
													<ContentPresenter x:Name="contentPresenter"
															ContentTemplate="{TemplateBinding ContentTemplate}"
															Content="{TemplateBinding Content}"
															ContentStringFormat="{TemplateBinding ContentStringFormat}"
															Focusable="False"
															HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
															Margin="{TemplateBinding Padding}"
															SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
															VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
												</Border>
												<ControlTemplate.Triggers>
													<Trigger Property="IsMouseOver" Value="True">
														<Setter Property="Background" TargetName="border"
																Value="#FFDADADA" />
														<Setter Property="BorderBrush" TargetName="border"
																Value="#FFDADADA" />
													</Trigger>
													<Trigger Property="IsPressed" Value="True">
														<Setter Property="Background" TargetName="border"
																Value="#FF606060" />
														<Setter Property="BorderBrush" TargetName="border"
																Value="#FF606060" />
													</Trigger>
													<Trigger Property="IsEnabled" Value="False">
														<Setter Property="Opacity" TargetName="contentPresenter"
																Value="0.56" />
														<Setter Property="Background" TargetName="border"
																Value="#FFF0F0F0" />
														<Setter Property="BorderBrush" TargetName="border"
																Value="#FFF0F0F0" />
													</Trigger>
												</ControlTemplate.Triggers>
											</ControlTemplate>
										</Setter.Value>
									</Setter>
								</Style>
							</RepeatButton.Style>
							<Path x:Name="ArrowBottom"
									Data="M0,2.5C0,2.5 0,0.5 0,0.5 0,0.5 3.5,4 3.5,4 3.5,4 7,0.5 7,0.5 7,0.5 7,2.5 7,2.5 7,2.5 3.5,6 3.5,6 3.5,6 0,2.5 0,2.5z"
									Fill="#FF606060" Margin="3,4,3,3" Stretch="Uniform" />
						</RepeatButton>
					</Grid>
					<ControlTemplate.Triggers>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding IsMouseOver, ElementName=PART_LineDownButton}" Value="true" />
								<Condition Binding="{Binding IsPressed, ElementName=PART_LineDownButton}" Value="true" />
							</MultiDataTrigger.Conditions>
							<Setter Property="Fill" TargetName="ArrowBottom" Value="White" />
						</MultiDataTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding IsMouseOver, ElementName=PART_LineUpButton}" Value="true" />
								<Condition Binding="{Binding IsPressed, ElementName=PART_LineUpButton}" Value="true" />
							</MultiDataTrigger.Conditions>
							<Setter Property="Fill" TargetName="ArrowTop" Value="White" />
						</MultiDataTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding IsMouseOver, ElementName=PART_LineDownButton}" Value="true" />
								<Condition Binding="{Binding IsPressed, ElementName=PART_LineDownButton}" Value="false" />
							</MultiDataTrigger.Conditions>
							<Setter Property="Fill" TargetName="ArrowBottom" Value="Black" />
						</MultiDataTrigger>
						<MultiDataTrigger>
							<MultiDataTrigger.Conditions>
								<Condition Binding="{Binding IsMouseOver, ElementName=PART_LineUpButton}" Value="true" />
								<Condition Binding="{Binding IsPressed, ElementName=PART_LineUpButton}" Value="false" />
							</MultiDataTrigger.Conditions>
							<Setter Property="Fill" TargetName="ArrowTop" Value="Black" />
						</MultiDataTrigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter Property="Fill" TargetName="ArrowTop" Value="#FFBFBFBF" />
							<Setter Property="Fill" TargetName="ArrowBottom" Value="#FFBFBFBF" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>-->
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="pack://application:,,,/Daytimer.Styles;component/Resources/ScrollBar.xaml" />
	</ResourceDictionary.MergedDictionaries>
	<Style TargetType="CharMap:FlexScrollBar">
		<Setter Property="Width" Value="15" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="CharMap:FlexScrollBar">
					<Grid x:Name="PART_TemplateRoot" SnapsToDevicePixels="True">
						<Grid.RowDefinitions>
							<RowDefinition MaxHeight="14" />
							<RowDefinition />
							<RowDefinition MaxHeight="14" />
						</Grid.RowDefinitions>
						<Rectangle Grid.RowSpan="3" Fill="#FFF3F3F3" IsHitTestVisible="False" />
						<RepeatButton x:Name="PART_LineUpButton" Style="{StaticResource ScrollBarLineButton}"
								Height="14" Command="ScrollBar.LineUpCommand" Content="M 0 4 L 7 4 L 3.5 0 Z" />
						<Track x:Name="PART_Track" Grid.Row="1" IsDirectionReversed="True" Margin="0,1"
								Orientation="Vertical">
							<Track.DecreaseRepeatButton>
								<RepeatButton Style="{StaticResource ScrollBarPageButton}"
										Command="ScrollBar.PageUpCommand" />
							</Track.DecreaseRepeatButton>
							<Track.Thumb>
								<Thumb Style="{StaticResource ScrollBarThumb}" Background="{DynamicResource White}" />
							</Track.Thumb>
							<Track.IncreaseRepeatButton>
								<RepeatButton Style="{StaticResource ScrollBarPageButton}"
										Command="ScrollBar.PageDownCommand" />
							</Track.IncreaseRepeatButton>
						</Track>
						<RepeatButton Grid.Row="3" Style="{StaticResource ScrollBarLineButton}" Height="14"
								Command="ScrollBar.LineDownCommand" Content="M 0 0 L 3.5 4 L 7 0 Z" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>